home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2001 May / SGI Freeware 2001 May - Disc 2.iso / dist / fw_urt.idb / usr / freeware / include / rle_code.h.z / rle_code.h
C/C++ Source or Header  |  1999-01-26  |  2KB  |  71 lines

  1. /*
  2.  * This software is copyrighted as noted below.  It may be freely copied,
  3.  * modified, and redistributed, provided that the copyright notice is 
  4.  * preserved on all copies.
  5.  * 
  6.  * There is no warranty or other guarantee of fitness for this software,
  7.  * it is provided solely "as is".  Bug reports or fixes may be sent
  8.  * to the author, who may or may not act on them as he desires.
  9.  *
  10.  * You may not include this software in a program or other software product
  11.  * without supplying the source, or without informing the end-user that the 
  12.  * source is available for no extra charge.
  13.  *
  14.  * If you modify this software, you should include a notice giving the
  15.  * name of the person performing the modification, the date of modification,
  16.  * and the reason for such modification.
  17.  */
  18. /* 
  19.  * rle_code.h - Definitions for Run Length Encoding.
  20.  * 
  21.  * Author:    Spencer W. Thomas
  22.  *         Computer Science Dept.
  23.  *         University of Utah
  24.  * Date:    Mon Aug  9 1982
  25.  * Copyright (c) 1982 Spencer W. Thomas
  26.  * 
  27.  * $Header: /usr/users/spencer/src/urt/include/RCS/rle_code.h,v 3.0 90/08/03 15:19:48 spencer Exp $
  28.  */
  29.  
  30. #ifndef RLE_MAGIC
  31.  
  32. /* 
  33.  * Opcode definitions
  34.  */
  35.  
  36. #define     LONG                0x40
  37. #define        RSkipLinesOp    1
  38. #define        RSetColorOp        2
  39. #define        RSkipPixelsOp    3
  40. #define        RByteDataOp        5
  41. #define        RRunDataOp        6
  42. #define        REOFOp        7
  43.  
  44. #define     H_CLEARFIRST        0x1    /* clear framebuffer flag */
  45. #define        H_NO_BACKGROUND    0x2    /* if set, no bg color supplied */
  46. #define        H_ALPHA        0x4   /* if set, alpha channel (-1) present */
  47. #define        H_COMMENT        0x8    /* if set, comments present */
  48.  
  49. struct XtndRsetup
  50. {
  51.     char    hc_xpos[2],
  52.             hc_ypos[2],
  53.             hc_xlen[2],
  54.             hc_ylen[2];
  55.     char    h_flags,
  56.             h_ncolors,
  57.         h_pixelbits,
  58.         h_ncmap,
  59.         h_cmaplen;
  60. };
  61. #define        SETUPSIZE    ((4*2)+5)
  62.  
  63. /* "Old" RLE format magic numbers */
  64. #define        RMAGIC    ('R' << 8)    /* top half of magic number */
  65. #define        WMAGIC    ('W' << 8)    /* black&white rle image */
  66.  
  67. #define        RLE_MAGIC    ((short)0xcc52)    /* RLE file magic number */
  68.  
  69. #endif /* RLE_MAGIC */
  70.  
  71.